package com.sias.realestate.web.service.impl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sias.realestate.core.generic.GenericDao;
import com.sias.realestate.core.generic.GenericServiceImpl;
import com.sias.realestate.web.dao.EmployeeMapper;
import com.sias.realestate.web.model.Employee;
import com.sias.realestate.web.service.EmployeeService;

@Service
public class EmployeeServiceImpl extends GenericServiceImpl<Employee, Integer> implements EmployeeService{

	@Resource
	private EmployeeMapper employeemapper;

	@Override
    public int insert(Employee model) {
        return employeemapper.insertSelective(model);
    }

    @Override
    public int update(Employee model) {
        return employeemapper.updateByPrimaryKeySelective(model);
    }

    @Override
    public int delete(Integer id) {
        return employeemapper.deleteByPrimaryKey(id);
    }

    @Override
    public Employee selectById(Integer id) {
        return employeemapper.selectByPrimaryKey(id);
    }
    
	@Override
	public List<Employee> selectList() {
		// TODO Auto-generated method stub		
		return employeemapper.findAll();
	}
	@Override
	public GenericDao<Employee, Integer> getDao() {
		// TODO Auto-generated method stub
		return employeemapper;
	}


}
